using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.Models;

public class KnowledgeBase : ITenantEntity
{
    public int Id { get; set; }

    [Required]
    public int TenantId { get; set; }

    [Required]
    [MaxLength(200)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(1000)]
    public string? Description { get; set; }

    public bool IsPublic { get; set; } = false;

    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    // Navigation properties
    public Tenant? Tenant { get; set; }
    public ICollection<Document> Documents { get; set; } = new List<Document>();
    public ICollection<AgentKnowledgeBase> AgentKnowledgeBases { get; set; } = new List<AgentKnowledgeBase>();
    public ICollection<KnowledgeBaseAdmin> KnowledgeBaseAdmins { get; set; } = new List<KnowledgeBaseAdmin>();
    public ICollection<KnowledgeBaseTeamAccess> KnowledgeBaseTeamAccesses { get; set; } = new List<KnowledgeBaseTeamAccess>();
}
